﻿using System;
using System.Collections.Generic;
using System.Text;

namespace YouHP.Config
{
    public class BaseConfig
    {
        private static BaseConfig _instance;

        public string WebsiteUrl { get; set; }
        public string WebRealPath { get; set; }
        public string ResourcePath { get; set; }
        public string WebsiteTitle { get; set; }
        public string WebsiteCatchWord { get; set; }
        public string RulesTxt { get; set; }
        public string PasswordKey { get; set; }
        public string DomainName { get; set; }
        public string MailServerUserName { get; set; }
        public string MailServerPassword { get; set; }
        public string MailServerDisplayName { get; set; }
        public string MailServerName { get; set; }

        public int TitleMaxSize = 50;
        public int TitleMinSize = 0;
        public int TopicMaxSize = 65535;
       
        public int TopicMinSize = 0;
        public int ReplyMaxSize = 65535;
        public int ReplyMinSize = 0;

        public int GroupNewPageSize = 15;
        public int GroupReplyPageSize = 10;

        public int GroupHottestNum = 6;
        public int ActionLatestNum = 5;

        public static BaseConfig Instance
        {
            get
            {
                if (_instance == null) _instance = new BaseConfig();
                return _instance;
            }
        }

        public BaseConfig()
        {
            WebsiteUrl = "";
            WebRealPath = "/Pages/Alpha";
            ResourcePath = "/support/alpha";
            WebsiteTitle = "YouHP";
            WebsiteCatchWord = "You HeathPoint,Hospital,Help";
            RulesTxt = "网站协议";
            PasswordKey = "YouHPKey";
            DomainName = "";

            /*邮件服务器设置*/
            MailServerUserName = "service@youhp.com";
            MailServerPassword = "n0service";
            MailServerDisplayName = "优医网服务中心";
            MailServerName = "mail.jahee.com";
        }
    }
}
